log using Replication_log, replace

***************************************************************************************************************************************
*This is the code to replicate the results of the article "Pandemics meet democracy: The footprint of COVID-19 on democratic attitudes"
*Read the README.txt file first
*May 2025
***************************************************************************************************************************************

clear all


***************************
*Install required packages*
***************************

ssc install reghdfe, replace
ssc install ftools, replace
ssc install combomarginsplot, replace
ssc install mplotoffset, replace
ssc install binscatter, replace
ssc install coefplot, replace
ssc install schemepack, replace


*************************
*Set scheme for graphics*
*************************

set scheme white_tableau



*****************************
use pandemics_data.dta, clear
*****************************


**********************************************************************************************************
*************************************************MAIN TEXT************************************************
**********************************************************************************************************


***************************************************************************************************
*Figure 1: Effect of the outbreak of COVID-19 on technocratic attitudes (individual fixed effects)*
***************************************************************************************************

quietly {
	estimates clear

	eststo tec_performancevoting_tab: reghdfe performancevoting i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_performancevoting, replace)

	eststo tec_techmanagement_tab: reghdfe techmanagement i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_techmanagement, replace)

	eststo tec_technocrats_tab: reghdfe technocrats i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_technocrats, replace)
}

combomarginsplot tec_performancevoting tec_techmanagement tec_technocrats, labels("Vote based on management, not ideas" "Technical management, not ideological" "Experts, not politicians") xline(721.5, lc(gray)) title("Technocratic preferences", size(*.8) margin(b=2)) xtitle("") ytitle("Degree of agreement (1-7 scale)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none))) offset(.3) saving(tec_combo,replace)
graph export figure_1.pdf, replace



***************************************************************************************************************
*Figure 2: Effect of the outbreak of COVID-19 on preferred qualities of politicians (individual fixed effects)*
***************************************************************************************************************

quietly {
	estimates clear

	eststo tec_mic_honesty_tab: reghdfe mic_honesty i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_mic_honesty, replace)

	eststo tec_mic_capacity_tab: reghdfe mic_capacity i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_mic_capacity, replace)

	eststo tec_mic_ideology_tab: reghdfe mic_ideology i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	margins datewave, saving(tec_mic_ideology, replace)
}

combomarginsplot tec_mic_honesty tec_mic_capacity tec_mic_ideology, labels("Honesty" "Capacity" "Ideology") xline(721.5, lc(gray)) title("Preferences for politicians' qualities", size(*.8) margin(b=2)) xtitle("") ytitle("Likelihood of quality ranked first") yscale(titlegap(*0) range(0 .6)) ylabel(0(.1).6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(6) r(1) size(small) region(fcol(none))) offset(0) saving(tec_mic_combo, replace)
graph export figure_2.pdf, replace



*********************************************************************************************************************************
*Figure 3: Effect of different threats on willingness to sacrifice liberties and need of a strong leader (experimental evidence)*
*********************************************************************************************************************************

quietly {
	estimates clear

	eststo threats_lib_tab: reg forgoliberties i.threat##i.datewave, cluster(CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"
	margins threat, at(datewave=(722 725 730 734 740 754 768))
	mplotoffset, title("Willingness to sacrifice liberties", size(*.8) margin(b=2)) ytitle("Degree of agreement (0-10 scale)") xtitle("") ylabel(3(1)9, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) legend(pos(0) bplacement(seast) c(1) size(*.9) region(fcol(none))) offset(.3) saving(threats_lib, replace)


	eststo threats_strong_tab: reg strongleader i.threat##i.datewave, cluster(CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"
	margins threat, at(datewave=(722 725 730 734 740 754 768))
	mplotoffset, title("Need of a strong leader", size(*.8) margin(b=2)) ytitle("Degree of agreement (0-10 scale)") xtitle("") ylabel(3(1)9, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(seast) c(1) size(*.9) region(fcol(none))) offset(.3) saving(threats_strong, replace)
}

graph combine threats_lib.gph threats_strong.gph, c(2) imargin(small) ycommon
graph export figure_3.pdf, replace



**********************************************************************************************************
*************************************************APPENDIX*************************************************
**********************************************************************************************************

*************************************************
*Table A1: Sample descriptive statistics by wave*
*************************************************

quietly {
	*! 1.0.1 NJC 4 Feb 2021 
	program variable_group_table 
		version 8 
		syntax varlist(numeric) [if] [in], by(varlist) STATs(string) ///
		[TRANSpose *] 
		
		* data to use 
		preserve 
		if `"`if'`in'"' != "" quietly keep `if' `in'
		marksample touse 
		markout `touse' `by', strok 
		quietly count if `touse'
		if r(N) == 0 error 2000  
		
		* copy group variable value labels if there are any 
		local labelname : value label `by'
		quietly if "`labelname'" != "" { 
			levelsof `by', local(bylevels)
			foreach x of local bylevels { 
				local labels `labels' `x'  `"`: label `labelname' `x''"' 
			}
		}

		* prepare call to -stack- while preserving variable labels or names 
		local i = 0 
		foreach v in `varlist' { 
			local ++i 
			local `v' : var label `v' 
			if "``v''" == "" local `v' "`v'"
			local label`i' "``v''" 
			local call `call' `v' `by'
		}
		local bylabel : var label `by' 
		if `"`bylabel'"' == "" local bylabel "`by'" 
		
		* stack 
		tempname value 
		stack `call', into(`value' `by') clear 
		
		* now use variable labels (names) as new value labels 
		local I = `i' 
		forval i = 1/`I' { 
			label def _stack `i'  "`label`i''", modify  
		}
		label val _stack _stack
		
		* blank out row and column variables 
		label var _stack " "
		label var `value' " "
		
		* copy group value labels if there were any 
		if "`labelname'" != "" { 
			label def `by' `labels'
			label val `by' `by'
		}

		label var `by' `"`bylabel'"' 

		* prepare table call 
		local call 
		foreach s of local stats {
			local call `call' `s' `value'
		} 

		* the table! 
		if "`transpose'" != "" table `by' _stack, c(`call') `options' 
		else table _stack `by', c(`call') `options' 
	end

	bysort wave (CodPanelista): egen nobswave=count(CodPanelista)
	label var nobswave "N"
}

variable_group_table gender age agecat* educat* incumbent lr lrcat* nobswave, by(nwave) stat(mean) format(%9.3gc)


**********************************************************************
*Table B1: Measurement of technocratic attitudes (correlation matrix)*
**********************************************************************

quietly {
	estimates clear

	estpost corr performancevoting elitism1-antipolitics4 if performancevoting!=. & techmanagement!=. & technocrats!=.
	est store corr1
	estpost corr techmanagement elitism1-antipolitics4 if performancevoting!=. & techmanagement!=. & technocrats!=.
	est store corr2
	estpost corr technocrats elitism1-antipolitics4 if performancevoting!=. & techmanagement!=. & technocrats!=.
	est store corr3
	estpost corr techatt elitism1-antipolitics4 if performancevoting!=. & techmanagement!=. & technocrats!=.
	est store corr4
}

esttab corr*, unstack not compress nonum noobs nodep b(%9.3f) star(* 0.10 ** 0.05 *** 0.01) mlabels("Management-based voting" "Technical management" "Experts not politicians" "Average")


********************************************************
*Figure C1: Comparison panelists vs rest of respondents*
********************************************************

quietly {
	*Wave 1 vs rest
	reghdfe techatt i.datewave if firstwave==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(firstwave_yes, replace)
	reghdfe techatt i.datewave if firstwave>1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(722 725 730 734 740 754 768)) saving(firstwave_no, replace)
	combomarginsplot firstwave_yes firstwave_no, xline(721.5, lc(gray)) title("Wave 1 participants vs rest", size(*.8) margin(b=2)) xtitle("") ytitle("Degree of agreement (1-7 scale)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Since wave 1" 4 "Later")) offset(.5) saving(tec_firstwave, replace)

	*First-timers vs rest
	reghdfe techatt i.datewave i.gender age agesq i.edu_cat if firsttime==1, noabsorb vce(cluster CodPanelista)
	margins , at(datewave=(720 722 730 754 768)) saving(firsttime_yes, replace)
	reghdfe techatt i.datewave i.gender age agesq i.edu_cat if firsttime==0, noabsorb vce(cluster CodPanelista)
	margins , at(datewave=(722 725 730 734 740 754 768)) saving(firsttime_no, replace)
	combomarginsplot firsttime_yes firsttime_no, xline(721.5, lc(gray)) title("First-time participants vs repeat participants", size(*.8) margin(b=2)) xtitle("") ytitle("Degree of agreement (1-7 scale)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "First-time in panel" 4 "Repeat in panel")) offset(.5) saving(tec_firsttime, replace)
}

graph combine tec_firstwave.gph tec_firsttime.gph, c(2) imargin(small) ycommon
graph export figure_c1.pdf, replace



******************************************************
*Figure D1: Technocratic preferences by initial shift*
*******************************************************

quietly {
	*We create variables to compute the first wave change

	foreach var in techatt performancevoting techmanagement technocrats mic_honesty mic_capacity mic_ideology mic_approachable mic_training rank_honesty rank_capacity rank_ideology{
		forval z=1(1)8{

		gen aux_`var'`z'=`var' if wave==`z'
		egen `var'_w`z'=max(aux_`var'`z'), by(CodPanelista)
		}
		gen deltaplac_`var'=`var'_w4-`var'_w3

		gen delta_`var'=`var'_w2-`var'_w1
		sum delta_`var'
		gen hdelta_`var'=(delta_`var'>`r(mean)') if delta_`var'!=.

		sum deltaplac_`var'
		gen hdeltaplac_`var'=(deltaplac_`var'>`r(mean)') if deltaplac_`var'!=.

		reg delta_`var' `var'_w1 if wave==2
		predict res`var'_w2, res
		sum res`var'_w2, d
		gen hdeltareg_`var'=res`var'_w2>0 if delta_`var'!=.

		drop aux_`var'*
	}

	global ytitle1 ytitle("Degree of agreement (1-7 scale)")
	global ytitle2 ytitle("                               ")
	global xlabel xlabel(720 "Jan 20" 722 "Mar 20" 725 "Jun 20" 730 "Nov 20" 734 "Mar 21" 740 "Sep 21" 754 "Nov 22" 768 "Jan 24",  angle(vertical)  labsize(*.8) nogrid)
	
	
	binscatter techatt datewave, by(hdelta_techatt) linetype(connect)  legend(label(1 "Technocratic attitudes (avg.), Low Initial Shift") label(2 "Technocratic attitudes (avg.), High Initial Shift" ))  xline(721.5, lc(gray)) title("Raw", size(*.8) margin(b=2)) xtitle("") $ytitle1 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6) nogrid) $xlabel xscale(range(719 741)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) name(a1, replace) /*requires installation of binscatter*/

	binscatter techatt datewave, by(hdeltareg_techatt) linetype(connect)  legend(label(1 "Technocratic attitudes (avg.), Low Initial Shift") label( 2 "Technocratic attitudes (avg.), High Initial Shift" ))  xline(721.5, lc(gray))title("Controlling for pre-covid levels", size(*.8) margin(b=2))  xtitle("") $ytitle2 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6) nogrid) $xlabel xscale(range(719 741)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) name(a2, replace) /*requires installation of binscatter*/
}

graph combine a1 a2, rows(1)  name(a1a6, replace) note("Controlling for pre-covid levels: sample split by the residuals of a regression of the initial shift on pre-covid levels") xcommon ycommon
graph export figure_d1.pdf, replace



******************************************************************************
*Figure D2: Immediate change in technocratic attitudes (March - January 2020)*
******************************************************************************

twoway kdensity delta_techatt if wave==2, title("Difference in technocratic attitudes between March and January 2020", size(medsmall)) ///
	ytitle("Density") xtitle("Difference in attitudes") ylabel(, nogrid) xlabel(, nogrid)
graph export figure_d2.pdf, replace



*******************************************************************************
*Figure D3: Immediate change in technocratic attitudes vs. pre-existing levels*
*******************************************************************************

binscatter delta_techatt techatt_w1 if wave==2, xtitle("Pre-pandemic Technocratic Preferences") ytitle("Immediate change in Technocratic Preferences") ///
	ylabel(, nogrid) xlabel(, nogrid)
graph export figure_d3.pdf, replace



***********
*Figure D4*
***********

quietly {
	estimates clear
	
	*Create auxiliary variables for the event study plot
	forval z=1(1)8{
		foreach var in techatt{
		gen inter_delta_`var'`z'=delta_`var'*i`z'.wave
		gen inter_deltaplac_`var'`z'=deltaplac_`var'*i`z'.wave

		gen initial_`var'`z'=`var'_w1*i`z'.wave

		}

		foreach var in techatt mic_honesty mic_capacity mic_ideology rank_honesty rank_capacity rank_ideology {
		gen inter_`var'_w2`z'=res`var'_w2*i`z'.wave
		}
	}

	gen zero=0
	global coefinter inter_delta_techatt2 inter_delta_techatt3 inter_delta_techatt4 inter_delta_techatt5 inter_delta_techatt6 inter_delta_techatt7 inter_delta_techatt8
	eststo a0: reg techatt zero $coefinter   delta_techatt i.wave,  cluster(CodPanelista)
	eststo a1: reg techatt zero $coefinter delta_techatt i.wave wave#c.techatt_w1 c.techatt_w1, cluster(CodPanelista)
}

coefplot (a0, label("Baseline")) (a1, label("Controlling for wave-by-January 2020 levels")), ///
	omitted keep(zero $coefinter)  graphregion(color(white))  vertical  ///
	title("Technocractic attitudes (avg.), wave-by-initial shift coefficients") ///
	xlabel(1 "Jan 2020" 2 "Mar 2020" 3 "Jun 2020" 4 "Nov 2020" 5 "Mar 2021" 6 "Sep 2021" 7 "Nov 2022" 8 "Jan 2024" , angle(45) nogrid) xline( 1.5) ylabel(, nogrid) ///
	legend(pos(6) rows(1))
graph export figure_d4.pdf, replace



***********
*Figure D5*
***********

quietly {
	estimates clear
	
	*Vote based on management
	binscatter performancevoting datewave, by(hdelta_techatt) linetype(connect)  legend(label(1 "Vote based on management, not ideas, Low Initial Shift") label( 2 "Vote based on management, not ideas, High Initial Shift" ))  xline(721.5, lc(gray)) xtitle("") $ytitle1 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a1, replace)

	binscatter performancevoting datewave, by(hdeltareg_techatt) linetype(connect)  legend(label(1 "Vote based on management, not ideas, Low Initial Shift") label( 2 "Vote based on management, not ideas, High Initial Shift" ))  xline(721.5, lc(gray))  xtitle("") $ytitle2 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a2, replace)

	*Technical management
	binscatter techmanagement datewave, by(hdelta_techatt) linetype(connect)  legend(label(1 "Technical management, not ideological, Low Initial Shift") label( 2 "Technical management, not ideological, High Initial Shift" ))  xline(721.5, lc(gray)) xtitle("") $ytitle1 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a3, replace)

	binscatter techmanagement datewave, by(hdeltareg_techatt) linetype(connect)  legend(label(1 "Technical management, not ideological, Low Initial Shift") label( 2 "Technical management, not ideological, High Initial Shift" ))  xline(721.5, lc(gray))  xtitle("") $ytitle2 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a4, replace)

	*Experts, not politicians
	binscatter technocrats datewave, by(hdelta_techatt) linetype(connect)  legend(label(1 "Experts, not politicians, Low Initial Shift") label( 2 "Vote based on management, not ideas, High Initial Shift" ))  xline(721.5, lc(gray)) xtitle("") $ytitle1 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a5, replace)

	binscatter technocrats datewave, by(hdeltareg_techatt) linetype(connect)  legend(label(1 "Experts, not politicians, Low Initial Shift") label( 2 "Vote based on management, not ideas, High Initial Shift" ))  xline(721.5, lc(gray))  xtitle("") $ytitle2 yscale(titlegap(*0)) ylabel(3.6(.2)5.8, labsize(*.6)) $xlabel xscale(range(719 754)) legend(pos(0) bplacement(seast) r(3) size(*.9) region(fcol(none))) ylabel(, nogrid) name(a6, replace)

	*Merge the figures 
	graph combine a1 a3 a5, rows(3) title("Raw", size(*.8) margin(b=2)) name(a1a3a5, replace)
	graph combine a2 a4 a6, rows(3) title("Controlling for pre-covid levels", size(*.8) margin(b=2)) name(a2a4a6, replace)
}

graph combine a1a3a5 a2a4a6, rows(1) title("Technocratic preferences by initial shift", size(*.8) margin(b=2)) name(a1a6, replace) note("Controlling for pre-covid levels: sample split by the residuals of a regression of the initial shift on pre-covid levels") xcommon ycommon
graph export figure_d5.pdf, replace



************************************************************************
*Figure D6: Permutation tests: distribution of placebo pandemic effects*
************************************************************************

quietly {
	estimates clear
	
	global reps 1000
	set seed 123
	capture drop aux 
	gen aux=_n

	foreach var in techatt mic_honesty mic_capacity mic_ideology{
		capture drop beta_`var'
		gen beta_`var'=.
	}

	forval w=1(1)$reps {
		capture drop auxuniform
		capture drop rwave
		capture drop rpost

		gen auxuniform=runiform(0,8)
		gen rwave=.

		forval z=1(1)8{
		replace rwave=`z' if auxuniform<=`z' & rwave==. 
	}

	gen rpost=rwave>1

	foreach var in techatt mic_honesty mic_capacity mic_ideology {
		reghdfe `var' rpost, absorb(CodPanelista)
		replace beta_`var'=_b[rpost] if aux==`w'
	}

	drop auxuniform rwave rpost
	}
	
	gen post=wave>1
	
	foreach var in techatt mic_honesty mic_capacity mic_ideology {
		reghdfe `var' post, absorb(CodPanelista)
	}

	twoway (kdensity beta_techatt, xline(.2798746) xlabel(-.35 -.15 0 .2798746 "Actual Estimate"  .15, nogrid) range(-.35 .35) ytitle("Density") xtitle("Random Pandemic Effect Estimate") subtitle("Technocratic Attitudes") ylabel(, nogrid) name(a1, replace))
	twoway (kdensity beta_mic_capacity, xline(.0766862) xlabel(-.15 0 .0766862 "Actual Estimate" .15, nogrid) range(-.15 .15) ytitle("Density") xtitle("Random Pandemic Effect Estimate") subtitle("Preference for Capacity") ylabel(, nogrid) name(a2, replace)) 
	twoway (kdensity beta_mic_honesty, xline(-.0944741) xlabel(-.15 -.0944741 "Actual Estimate" 0 .15, nogrid) range(-.15 .15) ytitle("Density") xtitle("Random Pandemic Effect Estimate") subtitle("Preference for Honesty") ylabel(, nogrid) name(a3, replace)) 
	twoway (kdensity beta_mic_ideology, xline(-.001491) xlabel(-.15 -.001491 "Actual Estimate" .15, nogrid) range(-.15 .15) ytitle("Density") xtitle("Random Pandemic Effect Estimate") subtitle("Preference for Ideology") ylabel(, nogrid) name(a4, replace))
}

graph combine a1 a2 a3 a4, rows(2)
graph export figure_d6.pdf, replace



**********************************************************************************************************
*Figure E1: Heterogeneity of effects on technocratic attitudes (panel evidence, individual fixed effects)*
**********************************************************************************************************

quietly {
	*Gender
	reghdfe techatt i.datewave if gender1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(male, replace)
	reghdfe techatt i.datewave if gender1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(female, replace)
	combomarginsplot male female, xline(721.5, lc(gray)) title("Sex", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Men" 4 "Women")) offset(.5) saving(tec_gender, replace)

	*Age
	reghdfe techatt i.datewave if age1_cat2==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(young, replace)
	reghdfe techatt i.datewave if age1_cat2==2, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, xline(721.5, lc(gray)) title("Age", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Under-35" 4 "Over-35")) offset(.5) saving(tec_age, replace)

	*Education
	reghdfe techatt i.datewave if edu1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(primaryorless, replace)
	reghdfe techatt i.datewave if edu1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(secondary, replace)
	reghdfe techatt i.datewave if edu1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(tertiary, replace)
	combomarginsplot primaryorless secondary tertiary, xline(721.5, lc(gray)) title("Education", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(4 "Primary or less" 5 "Secondary" 6 "Tertiary")) offset(.5) saving(tec_edu, replace)

	*Interest
	reghdfe techatt i.datewave if polint1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(lowint, replace)
	reghdfe techatt i.datewave if polint1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(highint, replace)
	combomarginsplot lowint highint, xline(721.5, lc(gray)) title("Political interest", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Low interest" 4 "High interest")) offset(.5) saving(tec_interest, replace)

	*Incumbent
	reghdfe techatt i.datewave if incumbent1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(opposition, replace)
	reghdfe techatt i.datewave if incumbent1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(incumbent, replace)
	combomarginsplot opposition incumbent, xline(721.5, lc(gray)) title("Incumbent supporter", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Incumbent supporter (No)" 4 "Incumbent supporter (Yes)")) offset(.5) saving(tec_incumbent, replace)

	*Ideology
	reghdfe techatt i.datewave if lr1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(left, replace)
	reghdfe techatt i.datewave if lr1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(center, replace)
	reghdfe techatt i.datewave if lr1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(right, replace)
	combomarginsplot left center right, xline(721.5, lc(gray)) title("Left-right", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(4 "Left" 5 "Center" 6 "Right")) offset(.5) saving(tec_lr, replace)
}

graph combine tec_gender.gph tec_age.gph tec_edu.gph tec_interest.gph tec_incumbent.gph tec_lr.gph, c(3) imargin(tiny) title("Technocratic preferences (average) - Heterogeneity", size(small))
graph export figure_e1.pdf, replace



******************************************************************************************************************
*Figure E2: Exposure to COVID-related risks and technocratic attitudes (panel evidence, individual fixed effects)*
******************************************************************************************************************

quietly{
	*Objective health exposure (own): infected
	reghdfe techatt i.datewave if infected_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(noninfected, replace)
	reghdfe techatt i.datewave if infected_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(infected, replace)
	combomarginsplot noninfected infected, xline(721.5, lc(gray)) title("Infected", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Non-infected" 4 "Infected")) offset(.5) saving(tec_infected, replace)

	*Objective health risk (own): age
	reghdfe techatt i.datewave if age1_cat<=2, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(young, replace)
	reghdfe techatt i.datewave if age1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, xline(721.5, lc(gray)) title("Health risk (objective)", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Under-60" 4 "Over-60")) offset(.5) saving(tec_old, replace)

	*Subjective health risk (own): subjserious
	reghdfe techatt c.subjserious##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768) subjserious=(1 8)) saving(serious, replace)
	mplotoffset , xline(721.5, lc(gray)) title("Health risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(tec_healthrisk, replace)

	*Subjective economic risk (own): subjeconsit
	reghdfe techatt i.datewave if subjeconsit_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(nonloser, replace)
	reghdfe techatt i.datewave if subjeconsit_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768)) saving(loser, replace)
	combomarginsplot nonloser loser, xline(721.5, lc(gray)) title("Economic risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(tec_econriskbin, replace)

	*Subjective health risk (own): predicted
	reghdfe techatt c.pred_healthrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768) pred_healthrisk=(3.4 6.4)) saving(predhealthrisk, replace)
	mplotoffset , xline(721.5, lc(gray)) title("Health risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(tec_predhealthrisk, replace)

	*Subjective economic risk (own): predicted
	reghdfe techatt c.pred_econrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	margins , at(datewave=(720 722 725 730 734 740 754 768) pred_econrisk=(2.3 1.7)) saving(predeconrisk, replace)
	mplotoffset , xline(721.5, lc(gray)) title("Economic risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Level of agreement (scale 1-7)") yscale(titlegap(*0)) ylabel(4(.5)6, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(719 769)) legend(pos(0) bplacement(seast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(tec_predeconrisk, replace)
	}

graph combine tec_infected.gph tec_old.gph tec_healthrisk.gph tec_econriskbin.gph tec_predhealthrisk.gph tec_predeconrisk.gph , c(3) imargin(tiny) title("Technocratic preferences (average) - By exposure and risk", size(small))
graph export figure_e2.pdf, replace



***************************************************************************************************
*Figure E3: Heterogeneity of effects on willingness to sacrifice liberties (experimental evidence)*
***************************************************************************************************

quietly {
	*Gender
	reg forgoliberties i.threatcovid##i.datewave if gender1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(male, replace)
	reg forgoliberties i.threatcovid##i.datewave if gender1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(female, replace)
	combomarginsplot male female, yline(0, lc(red)) title("Gender", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Men" 4 "Women")) offset(.5) saving(th_lib_gender, replace)

	*Age
	reg forgoliberties i.threatcovid##i.datewave if age1_cat2==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(young, replace)
	reg forgoliberties i.threatcovid##i.datewave if age1_cat2==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, yline(0, lc(red)) title("Age", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Under-35" 4 "Over-35")) offset(.5) saving(th_lib_age, replace)

	*Education
	reg forgoliberties i.threatcovid##i.datewave if edu1_cat==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(primaryorless, replace)
	reg forgoliberties i.threatcovid##i.datewave if edu1_cat==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(secondary, replace)
	reg forgoliberties i.threatcovid##i.datewave if edu1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(tertiary, replace)
	combomarginsplot primaryorless secondary tertiary, yline(0, lc(red)) title("Education", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(4 "Primary or less" 5 "Secondary" 6 "Tertiary")) offset(.5) saving(th_lib_edu, replace)

	*Interest
	reg forgoliberties i.threatcovid##i.datewave if polint1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(lowint, replace)
	reg forgoliberties i.threatcovid##i.datewave if polint1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(highint, replace)
	combomarginsplot lowint highint, yline(0, lc(red)) title("Interest", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low interest" 4 "High interest")) offset(.5) saving(th_lib_int, replace)

	*Incumbent
	reg forgoliberties i.threatcovid##i.datewave if incumbent1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(opposition, replace)
	reg forgoliberties i.threatcovid##i.datewave if incumbent1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(incumbent, replace)
	combomarginsplot opposition incumbent, yline(0, lc(red)) title("Incumbent support", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Incumbent supporter (No)" 4 "Incumbent supporter (Yes)")) offset(.5) saving(th_lib_inc, replace)

	*Ideology
	reg forgoliberties i.threatcovid##i.datewave if lr1_cat==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(left, replace)
	reg forgoliberties i.threatcovid##i.datewave if lr1_cat==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(center, replace)
	reg forgoliberties i.threatcovid##i.datewave if lr1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(right, replace)
	combomarginsplot left center right, yline(0, lc(red)) title("Left-right", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(720 `" "Jan" "20" "' 722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(4 "Left" 5 "Center" 6 "Right")) offset(.5) saving(th_lib_lr, replace)
}

graph combine th_lib_gender.gph th_lib_age.gph th_lib_edu.gph th_lib_int.gph th_lib_inc.gph th_lib_lr.gph , c(3) imargin(tiny) title("Willingness to sacrifice liberties - Heterogeneity", size(small))
graph export figure_e3.pdf, replace



****************************************************************************************
*Figure E4: Heterogeneity of effects on need of a strong leader (experimental evidence)*
****************************************************************************************

quietly {
	*Gender
	reg strongleader i.threatcovid##i.datewave if gender1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(male, replace)
	reg strongleader i.threatcovid##i.datewave if gender1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(female, replace)
	combomarginsplot male female, yline(0, lc(red)) title("Gender", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Men" 4 "Women")) offset(.5) saving(th_strong_gender, replace)

	*Age
	reg strongleader i.threatcovid##i.datewave if age1_cat2==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(young, replace)
	reg strongleader i.threatcovid##i.datewave if age1_cat2==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, yline(0, lc(red)) title("Age", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Under-35" 4 "Over-35")) offset(.5) saving(th_strong_age, replace)

	*Education
	reg strongleader i.threatcovid##i.datewave if edu1_cat==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(primaryorless, replace)
	reg strongleader i.threatcovid##i.datewave if edu1_cat==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(secondary, replace)
	reg strongleader i.threatcovid##i.datewave if edu1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(tertiary, replace)
	combomarginsplot primaryorless secondary tertiary, yline(0, lc(red)) title("Education", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(4 "Primary or less" 5 "Secondary" 6 "Tertiary")) offset(.5) saving(th_strong_edu, replace)

	*Interest
	reg strongleader i.threatcovid##i.datewave if polint1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(lowint, replace)
	reg strongleader i.threatcovid##i.datewave if polint1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(highint, replace)
	combomarginsplot lowint highint, yline(0, lc(red)) title("Interest", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low interest" 4 "High interest")) offset(.5) saving(th_strong_int, replace)

	*Incumbent
	reg strongleader i.threatcovid##i.datewave if incumbent1==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(opposition, replace)
	reg strongleader i.threatcovid##i.datewave if incumbent1==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(incumbent, replace)
	combomarginsplot opposition incumbent, yline(0, lc(red)) title("Incumbent support", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Incumbent supporter (No)" 4 "Incumbent supporter (Yes)")) offset(.5) saving(th_strong_inc, replace)

	*Ideology
	reg strongleader i.threatcovid##i.datewave if lr1_cat==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(left, replace)
	reg strongleader i.threatcovid##i.datewave if lr1_cat==2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(center, replace)
	reg strongleader i.threatcovid##i.datewave if lr1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(right, replace)
	combomarginsplot left center right, yline(0, lc(red)) title("Left-right", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(4 "Left" 5 "Center" 6 "Right")) offset(.5) saving(th_strong_lr, replace)
}

graph combine th_strong_gender.gph th_strong_age.gph th_strong_edu.gph th_strong_int.gph th_strong_inc.gph th_strong_lr.gph , c(3) imargin(tiny) title("Need of a strong leader - Heterogeneity", size(small))
graph export figure_e4.pdf, replace



***********************************************************************************************************
*Figure E5: Exposure to COVID-related risks and willingness to sacrifice liberties (experimental evidence)*
***********************************************************************************************************

quietly {
	*Objective health exposure (own): infected
	reg forgoliberties i.threatcovid##i.datewave if infected_bin==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(noninfected, replace)
	reg forgoliberties i.threatcovid##i.datewave if infected_bin==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(infected, replace)
	combomarginsplot noninfected infected, yline(0, lc(red)) title("Health exposure", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Non-infected" 4 "Infected")) offset(.5) saving(th_lib_infected, replace)

	*Objective health risk (own): age
	reg forgoliberties i.threatcovid##i.datewave if age1_cat<=2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(young, replace)
	reg forgoliberties i.threatcovid##i.datewave if age1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, yline(0, lc(red)) title("Health risk (objective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Under-60" 4 "Over-60")) offset(.5) saving(th_lib_old, replace)

	*Subjective health risk (own): subjserious
	reg forgoliberties i.threatcovid##c.subjserious##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) subjserious=(1 8)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Health risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_lib_healthrisk, replace)

	*Subjective economic risk (own): subjeconsit
	reg forgoliberties i.threatcovid##i.datewave if subjeconsit_bin==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(nonloser, replace)
	reg forgoliberties i.threatcovid##i.datewave if subjeconsit_bin==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(loser, replace)
	combomarginsplot nonloser loser, yline(0, lc(red)) title("Economic risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_lib_econriskbin, replace)

	*Subjective health risk (own): predicted
	reg forgoliberties i.threatcovid##c.pred_healthrisk##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) pred_healthrisk=(3.4 6.4)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Health risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_lib_predhealthrisk, replace)

	*Subjective economic risk (own): predicted
	reg forgoliberties i.threatcovid##c.pred_econrisk##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) pred_econrisk=(2.3 1.7)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Economic risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_lib_predeconrisk, replace)
}

graph combine th_lib_infected.gph th_lib_old.gph th_lib_healthrisk.gph th_lib_econriskbin.gph th_lib_predhealthrisk.gph th_lib_predeconrisk.gph , c(3) imargin(tiny) title("Willingness to sacrifice liberties - By exposure and risk", size(small))
graph export figure_e5.pdf, replace



************************************************************************************************
*Figure E6: Exposure to COVID-related risks and need of a strong leader (experimental evidence)*
************************************************************************************************

quietly {
	*Objective health exposure (own): infected
	reg strongleader i.threatcovid##i.datewave if infected_bin==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(noninfected, replace)
	reg strongleader i.threatcovid##i.datewave if infected_bin==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(infected, replace)
	combomarginsplot noninfected infected, yline(0, lc(red)) title("Health exposure", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Non-infected" 4 "Infected")) offset(.5) saving(th_strong_infected, replace)

	*Objective health risk (own): age
	reg strongleader i.threatcovid##i.datewave if age1_cat<=2, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(young, replace)
	reg strongleader i.threatcovid##i.datewave if age1_cat==3, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(old, replace)
	combomarginsplot young old, yline(0, lc(red)) title("Health risk (objective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Under-60" 4 "Over-60")) offset(.5) saving(th_strong_old, replace)

	*Subjective health risk (own): subjserious
	reg strongleader i.threatcovid##c.subjserious##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) subjserious=(1 8)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Health risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_strong_healthrisk, replace)

	*Subjective economic risk (own): subjeconsit
	reg strongleader i.threatcovid##i.datewave if subjeconsit_bin==0, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(nonloser, replace)
	reg strongleader i.threatcovid##i.datewave if subjeconsit_bin==1, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768)) saving(loser, replace)
	combomarginsplot nonloser loser, yline(0, lc(red)) title("Economic risk (subjective)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_strong_econriskbin, replace)

	*Subjective health risk (own): predicted
	reg strongleader i.threatcovid##c.pred_healthrisk##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) pred_healthrisk=(3.4 6.4)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Health risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_strong_predhealthrisk, replace)

	*Subjective economic risk (own): predicted
	reg strongleader i.threatcovid##c.pred_econrisk##i.datewave, cluster(CodPanelista)
	margins , dydx(threatcovid) at(datewave=(722 725 730 734 740 754 768) pred_econrisk=(2.3 1.7)) saving(serious, replace)
	mplotoffset, yline(0, lc(red)) title("Economic risk (predicted)", size(*.8) margin(b=2)) xtitle("") ytitle("Marginal effects of Covid threat") yscale(titlegap(*0)) ylabel(-2(1)4, labsize(*.8) nogrid) xlabel(722 `" "Mar" "20" "' 725 `" "Jun" "20" "' 730 `" "Nov" "20" "' 734 `" "Mar" "21" "' 740 `" "Sep" "21" "' 754 `" "Nov" "22" "' 768 `" "Jan" "24" "', labsize(*.8) nogrid angle(horizontal)) xscale(range(721 769)) legend(pos(0) bplacement(neast) c(1) size(small) region(fcol(none)) order(3 "Low risk" 4 "High risk")) offset(.5) saving(th_strong_predeconrisk, replace)
}

graph combine th_strong_infected.gph th_strong_old.gph th_strong_healthrisk.gph th_strong_econriskbin.gph th_strong_predhealthrisk.gph th_strong_predeconrisk.gph , c(3) imargin(tiny) title("Need of a strong leader -  By exposure and risk", size(small))
graph export figure_e6.pdf, replace



********************************************************************************************************************************************
*Table F1: Regression estimates on the effect of outbreak of COVID-19 on technocratic attitudes (full models for Figure 1 in the main text)*
********************************************************************************************************************************************

quietly {
	estimates clear

	eststo tec_performancevoting_tab: reghdfe performancevoting i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_techmanagement_tab: reghdfe techmanagement i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_technocrats_tab: reghdfe technocrats i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	
	eststo tec_average_tab: reghdfe techatt i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab tec_performancevoting_tab tec_techmanagement_tab tec_technocrats_tab tec_average_tab , replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mlabels("Performance" "Management" "Rulers" "Average") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
************************************************************************************************************************************************************
*Table F2: Regression estimates on the effect of outbreak of COVID-19 on preferences for politicians' qualities (full models for Figure 2 in the main text)*
************************************************************************************************************************************************************

quietly {
	estimates clear

	eststo tec_mic_honesty_tab: reghdfe mic_honesty i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_mic_capacity_tab: reghdfe mic_capacity i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_mic_ideology_tab: reghdfe mic_ideology i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_mic_training_tab: reghdfe mic_training i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo tec_mic_approachable_tab: reghdfe mic_approachable i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab tec_mic_honesty_tab tec_mic_capacity_tab tec_mic_ideology_tab tec_mic_training_tab tec_mic_approachable_tab, replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mlabels("Honesty" "Capacity" "Ideology" "Training" "Approachable") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")

  

*********************************************************************************************************************************************************************************
*Table F3: Regression estimates of effect of different threats on willingness to sacrifice liberties and support for a strong leader (full models for Figure 3 in the main text)*
*********************************************************************************************************************************************************************************

quietly {
	estimates clear

	eststo threats_lib_tab: reg forgoliberties i.threat##i.datewave, cluster(CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"

	eststo threats_lib_fe_tab: reghdfe forgoliberties i.threat##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo threats_strong_tab: reg strongleader i.threat##i.datewave, cluster(CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"

	eststo threats_strong_fe_tab: reghdfe strongleader i.threat##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab threats_lib_tab threats_lib_fe_tab threats_strong_tab threats_strong_fe_tab, replace nonumbers nogaps noomit label noobs nomtitles nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 1.threat "Threat (Covid)" 2.threat "Threat (Climate change)" 3.threat "Threat (International terrorism)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024" 2.threat#725.datewave "Threat (Climate) $\times$ June 2020" 2.threat#730.datewave "Threat (Climate) $\times$ November 2020" 2.threat#734.datewave "Threat (Climate) $\times$ March 2021" 2.threat#740.datewave "Threat (Climate) $\times$ September 2021" 2.threat#754.datewave "Threat (Climate) $\times$ November 2022" 2.threat#768.datewave "Threat (Climate) $\times$ January 2024" 3.threat#725.datewave "Threat (Terrorism) $\times$ June 2020" 3.threat#730.datewave "Threat (Terrorism) $\times$ November 2020" 3.threat#734.datewave "Threat (Terrorism) $\times$ March 2021" 3.threat#740.datewave "Threat (Terrorism) $\times$ September 2021" 3.threat#754.datewave "Threat (Climate) $\times$ November 2022" 3.threat#768.datewave "Threat (Climate) $\times$ January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Sacrifice liberties" "Strong leader", pattern(1 0 1 0) span) /// ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
*****************************************************************************************************************
*Table F4: Regression estimates for attrition analyses (full models for Figure C1 in the supporting information)*
*****************************************************************************************************************

quietly {
	estimates clear

	eststo attrition1: reghdfe techatt i.datewave if firstwave==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo attrition2: reghdfe techatt i.datewave if firstwave>1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	eststo attrition3: reghdfe techatt i.datewave i.gender age agesq i.edu_cat if firsttime==1, noabsorb vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"

	eststo attrition4: reghdfe techatt i.datewave i.gender age agesq i.edu_cat if firsttime==0, noabsorb vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "No"
}

esttab attrition*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024" age "Age" agesq "Age$^2$" 1.edu "Education (Primary or less)" 2.edu "Education (Secondary)" 3.edu "Education (Tertiary)") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Wave 1 vs rest" "First-time vs repeat", pattern(1 0 1 0) span) ///
  mlabels("Since wave 1" "Later" "First-time" "Repeater") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
********************************************************************************************************
*Table F5: Wave-by-initial shift coefficients (full models for Figure D4 in the supporting information)*
********************************************************************************************************

quietly {
	estimates clear
	
	eststo a0: reg techatt zero $coefinter delta_techatt i.wave,  cluster(CodPanelista)  
	estadd local n = e(N)
	estadd local wfe "Yes"
	estadd local wbyjanfe "No"
eststo a1: reg techatt zero $coefinter delta_techatt i.wave wave#c.techatt_w1 c.techatt_w1, cluster(CodPanelista)
	estadd local n = e(N)
	estadd local wfe "Yes"
	estadd local wbyjanfe "Yes"
}

esttab a0 a1, replace se nonumbers keep($coefinter) ///
	coeflabels(inter_delta_techatt2 "March 2020 $\times$ Initial Shift" inter_delta_techatt3 "Jun 2020 $\times$ Initial Shift" inter_delta_techatt4 "Nov 2020 $\times$ Initial Shift" inter_delta_techatt5 "Mar 2021 $\times$ Initial Shift" inter_delta_techatt6 "Sep 2021 $\times$ Initial Shift" inter_delta_techatt7 "Nov 2022 $\times$ Initial Shift" inter_delta_techatt8 "Jan 2024 $\times$ Initial Shift") ///
	mtitles("Tech. attitudes (avg)." "Tech. attitudes (avg).") ///
	scalars("wfe Wave FE" "wbyjanfe Wave-by-Jan 2020 level FE" "n N. of observations") ///
	b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	note("Standard errors clustered by individual in parentheses.")
	

********************************************************************************************************************************
*Table F6: Regression estimates for heterogeneity analyses (full models for top panels Figure E1 in the supporting information)*
********************************************************************************************************************************

quietly {
	estimates clear
	
	*Gender
	eststo htsa1: reghdfe techatt i.datewave if gender1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsa2: reghdfe techatt i.datewave if gender1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Age
	eststo htsa3: reghdfe techatt i.datewave if age1_cat2==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsa4: reghdfe techatt i.datewave if age1_cat2==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Education
	eststo htsa5: reghdfe techatt i.datewave if edu1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsa6: reghdfe techatt i.datewave if edu1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsa7: reghdfe techatt i.datewave if edu1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab htsa*, replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Gender" "Age" "Education", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Men" "Women" "Under-35" "Over-35" "Primary or less" "Secondary" "Tertiary") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
**************************************************************************************************************************************
*Table F7: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E1 in the supporting information)*
**************************************************************************************************************************************

quietly {
	estimates clear

	*Interest
	eststo htsb1: reghdfe techatt i.datewave if polint1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsb2: reghdfe techatt i.datewave if polint1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Incumbent
	eststo htsb3: reghdfe techatt i.datewave if incumbent1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsb4: reghdfe techatt i.datewave if incumbent1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Ideology
	eststo htsb5: reghdfe techatt i.datewave if lr1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsb6: reghdfe techatt i.datewave if lr1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htsb7: reghdfe techatt i.datewave if lr1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab htsb*, replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Political interest" "Incumbent support" "Ideology", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Low" "High" "No" "Yes" "Left" "Center" "Right") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
***********************************************************************************************************************************
*Table F8: Regression estimates for heterogeneity analyses (full models for top panels in Figure E2 in the supporting information)*
***********************************************************************************************************************************

quietly {
	estimates clear

	*Infected
	eststo htea1: reghdfe techatt i.datewave if infected_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htea2: reghdfe techatt i.datewave if infected_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Old
	eststo htea3: reghdfe techatt i.datewave if age1_cat<=2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo htea4: reghdfe techatt i.datewave if age1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Subjective health risk
	eststo htea5: reghdfe techatt c.subjserious##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab htea*, replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Health exposure" "Health risk (obj)" "Health risk (subj)", pattern(1 0 1 0 1) span) ///
  mlabels("Non-infected" "Infected" "Under-60" "Over-60" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")

  

********************************************************************************************************
*Table F9: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E2)*
********************************************************************************************************

quietly {
	estimates clear

	*Subjective economic risk
	eststo hteb1: reghdfe techatt i.datewave if subjeconsit_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hteb2: reghdfe techatt i.datewave if subjeconsit_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted health risk 
	eststo hteb3: reghdfe techatt c.pred_healthrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted economic risk
	eststo hteb4: reghdfe techatt c.pred_econrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hteb*, replace nonumbers nogaps noomit nobase label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept (January 2020)" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Economic risk (subj)" "Health risk (pred)" "Economic risk (pred)", pattern(1 0 1 1) span) ///
  mlabels("Low" "High" "" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")
  

  
******************************************************************************************************
*Table F10: Regression estimates for heterogeneity analyses (full models for top panels in Figure E3)*
******************************************************************************************************

quietly {
	estimates clear

	*Gender
	eststo hlsa1: reghdfe forgoliberties i.threatcovid##i.datewave if gender1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsa2: reghdfe forgoliberties i.threatcovid##i.datewave if gender1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Age
	eststo hlsa3: reghdfe forgoliberties i.threatcovid##i.datewave if age1_cat2==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsa4: reghdfe forgoliberties i.threatcovid##i.datewave if age1_cat2==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Education
	eststo hlsa5: reghdfe forgoliberties i.threatcovid##i.datewave if edu1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsa6: reghdfe forgoliberties i.threatcovid##i.datewave if edu1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsa7: reghdfe forgoliberties i.threatcovid##i.datewave if edu1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hlsa*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024" 1.threatcovid "Threat (Covid)") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Gender" "Age" "Education", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Men" "Women" "Under-35" "Over-35" "Primary or less" "Secondary" "Tertiary") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
*********************************************************************************************************
*Table F11: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E3)*
*********************************************************************************************************

quietly {
	estimates clear

	*Interest
	eststo hlsb1: reghdfe forgoliberties i.threatcovid##i.datewave if polint1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsb2: reghdfe forgoliberties i.threatcovid##i.datewave if polint1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Incumbent
	eststo hlsb3: reghdfe forgoliberties i.threatcovid##i.datewave if incumbent1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsb4: reghdfe forgoliberties i.threatcovid##i.datewave if incumbent1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Ideology
	eststo hlsb5: reghdfe forgoliberties i.threatcovid##i.datewave if lr1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsb6: reghdfe forgoliberties i.threatcovid##i.datewave if lr1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlsb7: reghdfe forgoliberties i.threatcovid##i.datewave if lr1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hlsb*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Political interest" "Incumbent support" "Ideology", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Low" "High" "No" "Yes" "Left" "Center" "Right") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
******************************************************************************************************
*Table F12: Regression estimates for heterogeneity analyses (full models for top panels in Figure E4)*
******************************************************************************************************

quietly {
	estimates clear

	*Gender
	eststo hssa1: reghdfe strongleader i.threatcovid##i.datewave if gender1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssa2: reghdfe strongleader i.threatcovid##i.datewave if gender1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Age
	eststo hssa3: reghdfe strongleader i.threatcovid##i.datewave if age1_cat2==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssa4: reghdfe strongleader i.threatcovid##i.datewave if age1_cat2==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Education
	eststo hssa5: reghdfe strongleader i.threatcovid##i.datewave if edu1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssa6: reghdfe strongleader i.threatcovid##i.datewave if edu1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssa7: reghdfe strongleader i.threatcovid##i.datewave if edu1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hssa*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024" 1.threatcovid "Threat (Covid)") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Gender" "Age" "Education", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Men" "Women" "Under-35" "Over-35" "Primary or less" "Secondary" "Tertiary") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
*********************************************************************************************************
*Table F13: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E4)*
*********************************************************************************************************

quietly {
	estimates clear

	*Interest
	eststo hssb1: reghdfe strongleader i.threatcovid##i.datewave if polint1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssb2: reghdfe strongleader i.threatcovid##i.datewave if polint1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Incumbent
	eststo hssb3: reghdfe strongleader i.threatcovid##i.datewave if incumbent1==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssb4: reghdfe strongleader i.threatcovid##i.datewave if incumbent1==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Ideology
	eststo hssb5: reghdfe strongleader i.threatcovid##i.datewave if lr1_cat==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssb6: reghdfe strongleader i.threatcovid##i.datewave if lr1_cat==2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hssb7: reghdfe strongleader i.threatcovid##i.datewave if lr1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hssb*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Political interest" "Incumbent support" "Ideology", pattern(1 0 1 0 1 0 0) span) ///
  mlabels("Low" "High" "No" "Yes" "Left" "Center" "Right") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
******************************************************************************************************
*Table F14: Regression estimates for heterogeneity analyses (full models for top panels in Figure E5)*
******************************************************************************************************

quietly {
	estimates clear

	*Infected
	eststo hlea1: reghdfe forgoliberties i.threatcovid##i.datewave if infected_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlea2: reghdfe forgoliberties i.threatcovid##i.datewave if infected_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Old
	eststo hlea3: reghdfe forgoliberties i.threatcovid##i.datewave if age1_cat<=2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hlea4: reghdfe forgoliberties i.threatcovid##i.datewave if age1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Subjective health risk
	eststo hlea5: reghdfe forgoliberties i.threatcovid##c.subjserious##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hlea*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Health exposure" "Health risk (obj)" "Health risk (subj)", pattern(1 0 1 0 1) span) ///
  mlabels("Non-infected" "Infected" "Under-60" "Over-60" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")


  
*********************************************************************************************************
*Table F15: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E5)*
*********************************************************************************************************

quietly {
	estimates clear

	*Subjective economic risk
	eststo hleb1: reghdfe forgoliberties i.threatcovid##i.datewave if subjeconsit_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hleb2: reghdfe forgoliberties i.threatcovid##i.datewave if subjeconsit_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted health risk 
	eststo hleb3: reghdfe forgoliberties i.threatcovid##c.pred_healthrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted economic risk
	eststo hleb4: reghdfe forgoliberties i.threatcovid##c.pred_econrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hleb*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Economic risk (subj)" "Health risk (pred)" "Economic risk (pred)", pattern(1 0 1 1) span) ///
  mlabels("Low" "High" "" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")

  

******************************************************************************************************
*Table F16: Regression estimates for heterogeneity analyses (full models for top panels in Figure E6)*
******************************************************************************************************

quietly {
	estimates clear

	*Infected
	eststo hsea1: reghdfe strongleader i.threatcovid##i.datewave if infected_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hsea2: reghdfe strongleader i.threatcovid##i.datewave if infected_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Old
	eststo hsea3: reghdfe strongleader i.threatcovid##i.datewave if age1_cat<=2, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hsea4: reghdfe strongleader i.threatcovid##i.datewave if age1_cat==3, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Subjective health risk
	eststo hsea5: reghdfe strongleader i.threatcovid##c.subjserious##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hsea*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Health exposure" "Health risk (obj)" "Health risk (subj)", pattern(1 0 1 0 1) span) ///
  mlabels("Non-infected" "Infected" "Under-60" "Over-60" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")

  

*********************************************************************************************************
*Table F17: Regression estimates for heterogeneity analyses (full models for bottom panels in Figure E6)*
*********************************************************************************************************

quietly {
	estimates clear

	*Subjective economic risk
	eststo hseb1: reghdfe strongleader i.threatcovid##i.datewave if subjeconsit_bin==0, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
	eststo hseb2: reghdfe strongleader i.threatcovid##i.datewave if subjeconsit_bin==1, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted health risk 
	eststo hseb3: reghdfe strongleader i.threatcovid##c.pred_healthrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"

	*Predicted economic risk
	eststo hseb4: reghdfe strongleader i.threatcovid##c.pred_econrisk##i.datewave, absorb(CodPanelista) vce(cluster CodPanelista)
	estadd local n = e(N)
	estadd local unique = e(N_clust)
	estadd local ife "Yes"
}

esttab hseb*, replace nonumbers nogaps noomit label noobs nonotes ///
  order(_cons) coeflabels(_cons "Intercept" 722.datewave "March 2020" 725.datewave "June 2020" 730.datewave "November 2020" 734.datewave "March 2021" 740.datewave "September 2021" 754.datewave "November 2022" 768.datewave "January 2024") ///
  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
  collabels("") scalars("ife Individual FE" "n N. of observations" "unique N. of unique respondents" "r2 R$^2$") ///
  mgroups("Economic risk (subj)" "Health risk (pred)" "Economic risk (pred)", pattern(1 0 1 1) span) ///
  mlabels("Low" "High" "" "") ///
  addnotes("Standard errors clustered by individual in parentheses. *p$<$.1; **p$<$.05; ***p$<$.01.")

  
  

quietly {
	**************************
	*Erase intermediate files*
	**************************
	erase tec_performancevoting.dta
	erase tec_techmanagement.dta
	erase tec_technocrats.dta
	erase tec_mic_honesty.dta
	erase tec_mic_capacity.dta
	erase tec_mic_ideology.dta
	erase threats_lib.gph
	erase threats_strong.gph
	erase tec_firstwave.gph
	erase tec_firsttime.gph
	erase tec_gender.gph
	erase tec_age.gph
	erase tec_edu.gph
	erase tec_interest.gph
	erase tec_incumbent.gph
	erase tec_lr.gph
	erase tec_infected.gph 
	erase tec_old.gph 
	erase tec_healthrisk.gph 
	erase tec_econriskbin.gph 
	erase tec_predhealthrisk.gph 
	erase tec_predeconrisk.gph
	erase th_lib_gender.gph
	erase th_lib_age.gph
	erase th_lib_edu.gph
	erase th_lib_int.gph
	erase th_lib_inc.gph
	erase th_lib_lr.gph
	erase th_strong_gender.gph
	erase th_strong_age.gph
	erase th_strong_edu.gph
	erase th_strong_int.gph
	erase th_strong_inc.gph
	erase th_strong_lr.gph
	erase th_lib_infected.gph
	erase th_lib_old.gph
	erase th_lib_healthrisk.gph
	erase th_lib_econriskbin.gph
	erase th_lib_predhealthrisk.gph
	erase th_lib_predeconrisk.gph
	erase th_strong_infected.gph
	erase th_strong_old.gph
	erase th_strong_healthrisk.gph
	erase th_strong_econriskbin.gph
	erase th_strong_predhealthrisk.gph
	erase th_strong_predeconrisk.gph
	erase firsttime_no.dta
	erase firsttime_yes.dta
	erase firstwave_no.dta
	erase firstwave_yes.dta
	erase tec_mic_combo.gph
	erase tec_combo.gph
	erase serious.dta
	erase loser.dta
	erase nonloser.dta
	erase old.dta
	erase young.dta
	erase infected.dta
	erase noninfected.dta
	erase right.dta
	erase center.dta
	erase left.dta
	erase incumbent.dta
	erase opposition.dta
	erase highint.dta
	erase lowint.dta
	erase tertiary.dta
	erase secondary.dta
	erase primaryorless.dta
	erase female.dta
	erase male.dta
	erase predeconrisk.dta
	erase predhealthrisk.dta
}

log close